home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 279 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: news.crd.ge.com!usenet
  2. From: kornfein@unconfigured.xvnews.domain (Mark Kornfein)
  3. Newsgroups: comp.lang.c++
  4. Subject: Static creator methods
  5. Date: 3 Jan 1996 15:15:40 GMT
  6. Organization: The unconfigured xvnews people
  7. Message-ID: <4ce6is$gpp@rdsunx.crd.ge.com>
  8. Reply-To: kornfein@unconfigured.xvnews.domain
  9. NNTP-Posting-Host: cruncher.crd.ge.com
  10.  
  11. I have some code that I inherited that uses static creator methods (functions) to
  12. create new instances of a class. Anotherwords the "new ClassConstructor" is called
  13. from a static method instead of directly.
  14.  
  15. I assumed that this was done because the original coder did not understand C++.
  16. Now I read a manual for a class library that recommends always using these,
  17. but does not say why.
  18.  
  19. What are the advantages/disadvantages of encapsulating the instantiation of
  20. objects this way?
  21.  
  22. -- 
  23. ===============================================================================
  24. Mark Kornfein                              INET: kornfein@crd.ge.com
  25. GE Corporate Research & Development        Phone: (518) 387-5843
  26. One Research Circle, K1-5B36, Schenectady, NY 12301                         
  27.  
  28.  
  29.